/*
 * PTXExection.h
 *
 * This header file defines it's property and some 
 * operations' prototype.
 */
#ifndef _PTXEXECTION_H
#define _PTXEXECTION_H

#include "g_crossbit/Record.h"

#define PATH_LEN 100
#define ALIGN_OFFSET(offset, alignment) \
    (offset) = ( (offset) + (alignment) - 1) & ~((alignment) - 1)

namespace g_crossbit
{

   class PTXExecution
   {
   public:
      /* Constructor. */
      PTXExecution (unsigned int, IA32ProcessorState *);
      /* Execute contents in a ptx file on gpu. */
      void run ();
   private:
      /* Produce a name of file. */
      void produceName (unsigned int, short);
   private:
      char ptx_fn[PATH_LEN];     /* Ptx file's name.   */
      char record_fn[PATH_LEN];  /* Record file's name */
      Record *records_ptr;       /* start address of records  */
	  ProcessorState *cur_state; /* current processor's state */ 
   };

}
#endif
